/**
 * 外观模式：类似于control层，客户端只要对外观模式进行调用，不用关心内部的具体实现
 */
public class FacadePattern {
    public static void main(String[] args) {
        BuyCoating buyCoating=new BuyCoating();
        buyCoating.buyCoating();
    }
}
// 比如：客户需要三种颜色的涂料
class BuyCoating{
    public void buyCoating(){
        if(RedCoating.paintRed()&&BlueCoating.paintBlue()&&GreenCoating.paintGreen()){
            System.out.println("购买了所有涂料");
        }
    }
}
class RedCoating{
    public static boolean paintRed(){
        System.out.println("红色涂料");
        return true;
    }
}
class BlueCoating{
    public static boolean paintBlue(){
        System.out.println("蓝色涂料");
        return true;
    }
}
class GreenCoating{
    public static boolean paintGreen(){
        System.out.println("绿色涂料");
        return true;
    }
}